const [slcIcon, weixinIcon, alipayIcon] = [
  'https://img.16pinpin.com/slc_pay.png',
  'https://img.16pinpin.com/weixin_pay.png',
  'https://img.16pinpin.com/ali_pay.png'
];
const getPayType = type => {
  let text = '';
  let color = '';
  let icon = '';

  switch (type) {
    case 'weixin_public':
    case 'weixin':
      text = '微信收款';
      color = '09c111';
      icon = weixinIcon;
      break;

    case 'alipay':
      text = '支付宝收款';
      color = '1d9de7';
      icon = alipayIcon;
      break;

    default:
      text = '会员余额收款';
      color = 'ff456f';
      icon = slcIcon;
      break;
  }

  return {
    text,
    color,
    icon
  };
};

module.exports.getPayType = getPayType;